package com.atguigu.tingshu.album.client;

import com.atguigu.tingshu.album.client.impl.TrackInfoDegradeFeignClient;
import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.album.TrackInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-album", fallback = TrackInfoDegradeFeignClient.class)
public interface TrackInfoFeignClient {
    @GetMapping("api/album/trackInfo/findTrackInfoList/{id}/{count}")
    public Result<List<TrackInfo>>findTrackInfoList(@PathVariable("id")Long id ,
                                                    @PathVariable("count")Integer count );
    @GetMapping("api/album/trackInfo/findAlbumIdByTrackId/{id}")
    public Result<Long> findAlbumIdByTrackId(@PathVariable("id")Long id);
    @GetMapping("api/album/trackInfo/findTrackIdsByAlbumId/{albumId}")
    public Result<List<Long>> findTrackIdsByAlbumId(@PathVariable("albumId")Long albumId);
}